package com.group01.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 房屋绑定记录表 
 * </p>
 *
 * @author iuoly
 * @since 2022-07-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ZyOwnerRoomRecord extends Model<ZyOwnerRoomRecord> {

    private static final long serialVersionUID=1L;

    /**
     * 房屋绑定记录id
     */
    @TableId(value = "record_id", type = IdType.INPUT)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long recordId;

    /**
     * 房屋绑定id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ownerRoomId;

    /**
     * 小区id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;

    /**
     * 楼栋id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long buildingId;

    /**
     * 单元id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long unitId;

    /**
     * 房间id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long roomId;

    /**
     * 业主id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ownerId;

    /**
     * 业主类型
     */
    private String ownerType;

    /**
     * 绑定状态（0审核中 1绑定 2审核失败,3解绑）
     */
    private String roomStatus;

    /**
     * 审核意见
     */
    private String recordAuditOpinion;

    /**
     * 审核人类型
     */
    private String recordAuditType;

    /**
     * 创建人id
     */
    private Long createById;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String remark;


    @Override
    public Serializable pkVal() {
        return this.recordId;
    }

}
